package router

import (
	"gateway/basic/config"
	"gateway/handler/api"
	"gateway/middleware"
	"github.com/gin-gonic/gin"
)

func Withdrawal(v1 *gin.RouterGroup) {
	withdrawal := v1.Group("/withdrawal")
	{
		withdrawal.Use(middleware.JWTAuth(config.JWTKEY))
		withdrawal.POST("/create", api.CreateWithdrawal)         // 创建提现申请
		withdrawal.GET("/list", api.GetWithdrawalList)           // 获取提现记录列表
		withdrawal.GET("/detail", api.GetWithdrawalDetail)       // 获取提现详情
		withdrawal.GET("/config", api.GetWithdrawalConfig)       // 获取提现配置
		withdrawal.POST("/audit", api.AuditWithdrawal)        // 审核提现申请（需要管理员权限）
		withdrawal.GET("/amount_panel", api.GetWithdrawalSumAmount)   // 提现统计
	}
}

